using System.ComponentModel;
using BTOps;

/// <summary>
/// Summary description for BTReceivePortOperations
/// </summary>
[DataObject]
public class BTReceivePortOperations
{
    [DataObjectMethod(DataObjectMethodType.Select, true)]
    public BTReceivePort[] ListReceivePorts(string applicationName)
    {
        Operations btOps = new Operations();
        return btOps.ReceivePorts(applicationName, "");
    }

    [DataObjectMethod(DataObjectMethodType.Select, false)]
    public BTReceivePort[] ReceivePortByName(string applicationName, string name)
    {
        Operations btOps = new Operations();
        return btOps.ReceivePorts(applicationName, name);
    }

    [DataObjectMethod(DataObjectMethodType.Insert, true)]
    public void CreateReceivePort(BTReceivePort receivePort)
    {
        Operations btOps = new Operations();
        btOps.CreateReceivePort(receivePort);
    }

    [DataObjectMethod(DataObjectMethodType.Update, true)]
    public void UpdateReceivePort(BTReceivePort receivePort)
    {
        Operations btOps = new Operations();
        btOps.UpdateReceivePort(receivePort);
    }

    [DataObjectMethod(DataObjectMethodType.Delete, true)]
    public void DeleteReceivePort(BTReceivePort receivePort)
    {
        Operations btOps = new Operations();
        btOps.DeleteReceivePort(receivePort);
    }
}